﻿@model IEnumerable<Stamp_For_Africa_Version_2.Models.Watermark>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
        </th>
        <th>
            DisplayName
        </th>
        <th>
            Description
        </th>
        <th></th>
    </tr>

@foreach (var item in Model)
{
    <tr>
        <td>
          <img alt ="" src='@Url.Action("ShowWatermark", new { id = item.Id })' width="100" height=auto/>
      
          
        </td>
        <td>
            @Html.ActionLink(item.DisplayName, "Details", new { id = item.Id })
            
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Description)
        </td>

        @{
          if (User.IsInRole("Administrator"))
          {
            <td>
              @Html.ActionLink("Edit", "Edit", new {id = item.Id}) |
              @Html.ActionLink("Delete", "Delete", new {id = item.Id})
            </td>
          }
        }
    </tr>
}

</table>
